# -*- coding: utf-8 -*-,
# @File : udp_rscv.py,
# @Author : lidong,
# @IDEA: PyCharm
# @Time :  2022/5/10 16:10

# -*- coding: utf-8 -*-,
# @File : udp_dend.py,
# @Author : lidong,
# @IDEA: PyCharm
# @Time :  2022/5/10 16:10

import socket


def main():
    udp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    localaddr = ("", 7788)
    udp_socket.bind(localaddr)
    while True:
        recv_data = udp_socket.recv(1024)
        # recv_msg = recv_data[0]
        # recv_addr = recv_msg[1]

        print(recv_data)
        # print(recv_msg)
    udp_socket.close()


if __name__ == '__main__':
    main()